Skip to content

Commit

Permalink
Got it all sorted out
Browse files Browse the repository at this point in the history
Only problem is VSCode recognizng the package when installed without adding
python.analysis.extraPaths
Good to announce
  • Loading branch information
Riprock committed Oct 16, 2024
1 parent bee32f5 commit b2785b9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,17 @@ pip install acintellisense
Now if your PyCharm project is accessible to this package,
after `import ac`, you should be able to use autocomplete.

Now you can check your IDE, autocomplete shall work.
Now you can check your IDE, autocomplete should work.

## Note
I dont know why vscode intellisense has a hard time but I had to make the .vscode/settings.json file that contains
```
{
"python.analysis.extraPaths": ["./"]
}
```

If anyone knows how to fix it so this is not required please let me know

## Contribution
Please submit issues/pull requests if there is something missing, documentation inaccuracy, or a revision
Expand Down
5 changes: 3 additions & 2 deletions ac/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
__all__ = ["getDriverName", "getCarState", "testcall"]
from .core import getDriverName, getCarState, testcall
__all__ = ['getCarState', 'getDriverName', 'getTrackName', 'getTrackConfiguration', 'getCarName', 'getLastSplits', 'isCarInPitlane', 'isCarInPitline', 'isCarInPit', 'isConnected', 'getCarBallast', 'getCarMinHeight', 'getServerName', 'getServerIP', 'getServerHttpPort', 'getServerSlotsCount', 'getCarsCount', 'getCarLeaderboardPosition', 'getCarRealTimeLeaderboardPosition', 'getCarFFB', 'setCarFFB', 'setCameraMode', 'getCameraMode', 'isCameraOnBoard', 'setCameraCar', 'getCameraCarCount', 'focusCar', 'getFocusedCar', 'log', 'console', 'newApp', 'setTitle', 'setSize', 'addLabel', 'setPosition', 'setIconPosition', 'setTitlePosition', 'getPosition', 'setText', 'getText', 'setBackgroundOpacity', 'drawBackground', 'drawBorder', 'setBackgroundTexture', 'setFontAlignment', 'setBackgroundColor', 'setVisible', 'addOnAppActivatedListener', 'addOnAppDismissedListener', 'addRenderCallback', 'setFontColor', 'setFontSize', 'initFont', 'setCustomFont', 'addButton', 'addOnClickedListener', 'addGraph', 'addSerieToGraph', 'addValueToGraph', 'setRange', 'addSpinner', 'setValue', 'getValue', 'setStep', 'addOnValueChangeListener', 'addProgressBar', 'addTextInput', 'setFocus', 'addOnValidateListener', 'addListBox', 'addItem', 'removeItem', 'getItemCount', 'setItemNumberPerPage', 'highlightListBoxItem', 'addOnListBoxSelectionListener', 'addOnListBoxDeselectionListener', 'setAllowDeselection', 'setAllowMultiSelection', 'getSelectedItems', 'addCheckBox', 'addOnCheckBoxChanged', 'addTextBox', 'newTexture', 'glBegin', 'glEnd', 'glVertex2f', 'glColor3f', 'glColor4f', 'glQuad', 'glQuadTextured', 'isAcLive', 'restart', 'getCarSkin', 'getDriverNationCode', 'getCurrentSplits', 'getTrackLength', 'getWindSpeed', 'getWindDirection', 'isAIControlled', 'getCarEngineBrakeCount', 'getCarPowerControllerCount', 'freeCameraSetClearColor', 'freeCameraMoveForward', 'freeCameraMoveRight', 'freeCameraMoveUpWorld', 'freeCameraRotatePitch', 'freeCameraRotateHeading', 'freeCameraRotateRoll', 'sendChatMessage', 'addOnChatMessageListener', 'getCarRestrictor', 'getCarTyreCompound', 'getSize', 'setFont', 'shutdown']

from .core import getCarState, getDriverName, getTrackName, getTrackConfiguration, getCarName, getLastSplits, isCarInPitlane, isCarInPitline, isCarInPit, isConnected, getCarBallast, getCarMinHeight, getServerName, getServerIP, getServerHttpPort, getServerSlotsCount, getCarsCount, getCarLeaderboardPosition, getCarRealTimeLeaderboardPosition, getCarFFB, setCarFFB, setCameraMode, getCameraMode, isCameraOnBoard, setCameraCar, getCameraCarCount, focusCar, getFocusedCar, log, console, newApp, setTitle, setSize, addLabel, setPosition, setIconPosition, setTitlePosition, getPosition, setText, getText, setBackgroundOpacity, drawBackground, drawBorder, setBackgroundTexture, setFontAlignment, setBackgroundColor, setVisible, addOnAppActivatedListener, addOnAppDismissedListener, addRenderCallback, setFontColor, setFontSize, initFont, setCustomFont, addButton, addOnClickedListener, addGraph, addSerieToGraph, addValueToGraph, setRange, addSpinner, setValue, getValue, setStep, addOnValueChangeListener, addProgressBar, addTextInput, setFocus, addOnValidateListener, addListBox, addItem, removeItem, getItemCount, setItemNumberPerPage, highlightListBoxItem, addOnListBoxSelectionListener, addOnListBoxDeselectionListener, setAllowDeselection, setAllowMultiSelection, getSelectedItems, addCheckBox, addOnCheckBoxChanged, addTextBox, newTexture, glBegin, glEnd, glVertex2f, glColor3f, glColor4f, glQuad, glQuadTextured, isAcLive, restart, getCarSkin, getDriverNationCode, getCurrentSplits, getTrackLength, getWindSpeed, getWindDirection, isAIControlled, getCarEngineBrakeCount, getCarPowerControllerCount, freeCameraSetClearColor, freeCameraMoveForward, freeCameraMoveRight, freeCameraMoveUpWorld, freeCameraRotatePitch, freeCameraRotateHeading, freeCameraRotateRoll, sendChatMessage, addOnChatMessageListener, getCarRestrictor, getCarTyreCompound, getSize, setFont, shutdown
5 changes: 0 additions & 5 deletions ac/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
#NOTE: I have only documented the functions I have found code examples for or enough conversation context on forms/etc to tell me what it does
from typing import Callable

__all__ = ["getDriverName", "getCarState", "testcall"]

def testcall():
print("test")

def getCarState(car_identifier, info_identifier, optional_identifier=None):
"""
Gets the current state of the car
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup, find_packages
from pathlib import Path

VERSION = '1.0.5'
VERSION = '1.1.0'
DESCRIPTION = 'Assetto Corsa intellisense stubs helper'
LONG_DESCRIPTION = Path('README.md').read_text(encoding='utf-8')
# Setting up
Expand Down

0 comments on commit b2785b9

Please sign in to comment.