Closed skupriienko closed 3 weeks ago
@DanyilNefodov Could you please run tests against these changes? Because I'm getting KeyError: 'MJ_APIKEY_PUBLIC'
if I run pytest test.py
@DanyilNefodov Could you please run tests against these changes? Because I'm getting
KeyError: 'MJ_APIKEY_PUBLIC'
if I runpytest test.py
I was able to run tests
Links
Plan to enable Python conventions
PEP-8
"
quotesautopep8
andflake8
(with some additional plugins) as initial PEP8 lintersruff
for linting and formatting (addpyproject.toml
with the ruff configs)ruff check --select I --fix
bandit
configs topyproject.toml
(no issues found by runningbandit -c pyproject.toml -r .
)Fix theexception
's usagereturn
at the end of function able to return non-None
valueConfig
inherits fromobject
kwargs.get("version")
instead ofkwargs.get("version", None)
response
beforereturn
statementexcept
clause, raise exceptions withraise ... from err
orraise ... from None
to distinguish them from errors in exception handlingformat
call%
assert
detectedPath(filename).read_text()
if you read the text file to a variableos.path.abspath()
should be replaced byPath.resolve()
os.path.dirname()
should be replaced byPath.parent