Skip to content

chore: replace isort and flake8 with ruff#56

Merged
corp-0 merged 4 commits intounitystation:developfrom
Fogapod:ruff
Jun 17, 2023
Merged

chore: replace isort and flake8 with ruff#56
corp-0 merged 4 commits intounitystation:developfrom
Fogapod:ruff

Conversation

@Fogapod
Copy link
Copy Markdown
Contributor

@Fogapod Fogapod commented Jun 4, 2023

Ruff runs at 8 times faster on this project than isort + flake8 while performing more checks (387ms v 47ms).

It seems like imports were not sorted properly and poetry config for dev dependencies was broken, i fixed that (though unsure about huge .lock file changes, i do not use poetry myself), as well as fixing a few other lints like module name central-command -> central_command, line lengths etc.

Overall this is pretty strict config with lots of rules, these can be relaxed if needed. Currently all checks pass.

Also bumped max line length from 88 to 121

@commit-lint
Copy link
Copy Markdown

commit-lint Bot commented Jun 4, 2023

Chore

  • use ruff instead of flake8/isort (0e17429)

Contributors

Fogapod

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@Fogapod Fogapod changed the title Replace isort and flake8 with ruff feat: replace isort and flake8 with ruff Jun 4, 2023
@Fogapod Fogapod changed the title feat: replace isort and flake8 with ruff chore: replace isort and flake8 with ruff Jun 4, 2023
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml
Comment thread pyproject.toml
Comment thread src/accounts/api/serializers.py Outdated
@corp-0
Copy link
Copy Markdown
Member

corp-0 commented Jun 4, 2023

Did you test if the app was running?

@Fogapod
Copy link
Copy Markdown
Contributor Author

Fogapod commented Jun 4, 2023

I did not test this because project has 0 docs on how to run it

@corp-0
Copy link
Copy Markdown
Member

corp-0 commented Jun 4, 2023

To run the app you do the usual. Make a .env file, the values on example.env should be perfectly fine for running locally. You then docker compose up the dev-compose file.

@corp-0
Copy link
Copy Markdown
Member

corp-0 commented Jun 17, 2023

tested locally and this works fine. Merging.

@corp-0 corp-0 merged commit edb81b5 into unitystation:develop Jun 17, 2023
@Fogapod Fogapod deleted the ruff branch June 17, 2023 09:02
@commit-lint commit-lint Bot mentioned this pull request Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants