-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[MNT] moving linting to ruff, adding editorconfig
#653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 19 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
3ff49c7
introduce .editorconfig
tschm 05088bf
remove isort black and flake8, move towards ruff
tschm 3bff10e
pip install the package
tschm f3864c4
towards ruff
tschm acb0a58
check whether all hooks are respected
tschm 699a70e
ruff.toml (mostly deactivated for now)
tschm 623a64c
fixing basic ruff issues (use uvx ruff check --fix .)
tschm da22f1e
bunch of isort problems in the notebooks
tschm d79234c
Merge branch 'main' into editorconfig2
tschm 3a3b721
towards working ruff
tschm 8ba2107
line length 88
tschm 1d4cf44
mild impact of linting
tschm 3b30b4e
linting also in notebooks
tschm 72434b6
don't test isort, black and flake explicitly
tschm b562804
don't test isort, black and flake explicitly
tschm 8d4cd97
flake8 traces removed
tschm 95a0ba3
pre-commit now correctly complains about outdated codecov-action
tschm a9a03b8
stricter linting
tschm eddc3f7
remove link to tschm/.config-templates
tschm 4b121d8
remove commented out linting
tschm 3a2828c
ruff.toml integrated into pyproject.toml. excluded the notebooks from…
tschm a9460fc
revisit dev dependencies
tschm 72ee4c7
Merge branch 'PyPortfolio:main' into editorconfig2
tschm 109873d
Merge branch 'main' into pr/653
fkiraly fb8b1f4
Update pre-commit.yml
fkiraly 5d589ee
Update pyproject.toml
fkiraly 7600c44
move to main
fkiraly 4e71fd2
Update .pre-commit-config.yaml
fkiraly dd9b865
Update __init__.py
fkiraly 853d939
isort
fkiraly 15fea9a
Revert "isort"
fkiraly b1dcc79
Update main.yml
fkiraly 80fdc9f
Update __init__.py
fkiraly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # This file is part of the tschm/.config-templates repository | ||
| # (https://github.com/tschm/.config-templates). | ||
| # | ||
| root = true | ||
|
|
||
| # Default settings for all files | ||
| [*] | ||
| end_of_line = lf | ||
| trim_trailing_whitespace = true | ||
| insert_final_newline = true | ||
| charset = utf-8 | ||
|
|
||
| # Python, reStructuredText, and text files | ||
| [*.{py,rst,txt}] | ||
| indent_style = space | ||
| indent_size = 4 | ||
|
|
||
| # YAML, JSON, and other config files | ||
| [*.{yml,yaml,json}] | ||
| indent_style = space | ||
| indent_size = 2 | ||
|
|
||
| # Markdown files | ||
| # [*.{md,markdown}] | ||
| # trim_trailing_whitespace = false | ||
|
|
||
| # Don't apply editorconfig rules to vendor/ resources | ||
| # This is a "defensive" rule for the day we may have | ||
| # the vendor folder | ||
| [vendor/**] | ||
| charset = unset | ||
| end_of_line = unset | ||
| indent_size = unset | ||
| indent_style = unset | ||
| insert_final_newline = unset | ||
| trim_trailing_whitespace = unset |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Workflow: Pre-commit | ||
| # | ||
| # Purpose: This workflow runs pre-commit checks to ensure code quality | ||
| # and consistency across the codebase. It helps catch issues | ||
| # like formatting errors, linting issues, and other code quality | ||
| # problems before they are merged. | ||
| # | ||
| # Trigger: This workflow runs on every push and on pull requests to main/master | ||
| # branches (including from forks) | ||
| # | ||
| # Components: | ||
| # - 🔍 Run pre-commit checks using reusable action | ||
|
|
||
| name: "PRE-COMMIT" | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
| branches: [ main, master ] | ||
|
|
||
| jobs: | ||
| pre-commit: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.14' | ||
| - uses: pre-commit/action@v3.0.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v6.0.0 | ||
| hooks: | ||
| - id: check-toml | ||
| - id: check-yaml | ||
|
|
||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: 'v0.14.2' | ||
| hooks: | ||
| - id: ruff | ||
| args: [ --fix, --exit-non-zero-on-fix, --unsafe-fixes ] | ||
|
|
||
| # Run the formatter | ||
| - id: ruff-format | ||
|
|
||
| #- repo: https://github.com/igorshubovych/markdownlint-cli | ||
| # rev: v0.45.0 | ||
| # hooks: | ||
| # - id: markdownlint | ||
| # args: ["--disable", "MD013"] | ||
|
|
||
| - repo: https://github.com/python-jsonschema/check-jsonschema | ||
| rev: 0.34.1 | ||
| hooks: | ||
| #- id: check-renovate | ||
| # args: [ "--verbose" ] | ||
|
|
||
| - id: check-github-workflows | ||
| args: ["--verbose"] | ||
|
|
||
| - repo: https://github.com/rhysd/actionlint | ||
| rev: v1.7.8 | ||
| hooks: | ||
| - id: actionlint | ||
| args: [ -ignore, SC ] | ||
|
|
||
| - repo: https://github.com/abravalheri/validate-pyproject | ||
| rev: v0.24.1 | ||
| hooks: | ||
| - id: validate-pyproject |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.