vamseeachanta / assetutilities

Utilities for performing day to day tasks. Helps in automation of day to day business tasks
MIT License
0 stars 1 forks source link

Fix linter #17

Closed vamseeachanta closed 2 months ago

vamseeachanta commented 4 months ago

linter stopped working in VS code.

https://code.visualstudio.com/docs/python/linting https://realpython.com/python-code-quality/

vamseeachanta commented 4 months ago

@samdansk2 please complete literature study.

vamseeachanta commented 3 months ago

other options for linter:

https://stackoverflow.com/questions/77852109/using-ruff-linter-with-python-in-vs-code

https://trunk.io/linters/python/ruff

allows to use consistent lint settings across projects.

vamseeachanta commented 3 months ago

@samdansk2 @JayachandraJangiti , @saiachanta2728 please implement Ruff linter to close this issue.

Thank you

vamseeachanta commented 3 months ago

still exploring how to implement this. More links below: https://pylint.readthedocs.io/en/stable/ https://safjan.com/black-vs-yapf/

https://safjan.com/black-change-max-line-length/

https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff

https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter

https://cereblanco.medium.com/setup-black-and-isort-in-vscode-514804590bf9

https://python-poetry.org/docs/basic-usage/ https://www.markhneedham.com/blog/2023/07/24/vscode-poetry-python-interpreter/

vamseeachanta commented 3 months ago

My current settings:

"python.defaultInterpreterPath": "c:\\Users\\vamseea\\AppData\\Local\\miniconda3\\envs\\digitalmodel\\python.exe",
"python.formatting.provider": "black",
"python.terminal.activateEnvironment": true,
"[python]": {
    "editor.formatOnType": true,
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "ms-python.black-formatter",
    "editor.codeActionsOnSave": {
        "source.fixAll": "explicit",
        "source.organizeImports": "always"
    },
},
"ruff.organizeImports": "false",
"black-formatter.path": {
    "path": [
        "black"
    ]
},
"isort.args": [
    "--profile",
    "black"
],

.toml file contents [tool.isort] profile = "black" import_heading_stdlib = "Standard library imports" import_heading_thirdparty = "Third party imports" import_heading_firstparty = "Reader imports" multi_line_output = 3 include_trailing_comma = true force_grid_wrap = 0 line_length = 88

[tool.black] exclude = ''' /( .git | .mypy_cache | .tox | venv | .venv | _build | buck-out | build | dist )/ '''