-
Notifications
You must be signed in to change notification settings - Fork 118
Chore introduce linter #1280
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
Chore introduce linter #1280
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces the Ruff linter to the project to improve code quality and enforces Python coding standards. The changes address 45 linting violations by removing unused imports, fixing f-string formatting issues, correcting comparison operations, and organizing imports alphabetically.
- Adds Ruff configuration to
pyproject.tomlwith Python 3.7 target and specific exclusions - Fixes f-string violations by removing unnecessary f-string prefixes where no placeholders are used
- Removes unused imports and reorganizes remaining imports alphabetically
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Adds ruff to dev dependencies and reformats extras_require for better readability |
| pyproject.toml | Configures Ruff linter with target version, exclusions, and ignored rules |
| Tests/Utils_test.py | Reorganizes imports alphabetically and removes unused imports |
| Tests/SecurityService_test.py | Removes unused import case_and_space_insensitive_equals |
| Tests/ManageService_test.py | Removes unused imports random, string, and skip_if_version_lower_than |
| Tests/CellService_test.py | Fixes f-string formatting by removing unnecessary f prefixes |
| TM1py/init.py | Removes unused JobService import |
| TM1py/Utils/MDXUtils.py | Fixes f-string formatting in deprecation warnings |
| TM1py/Services/init.py | Removes unused GitService import |
| TM1py/Services/UserService.py | Removes unused deprecated_in_version import |
| TM1py/Services/SubsetService.py | Fixes f-string formatting in error message |
| TM1py/Services/ServerService.py | Removes unused pytz import |
| TM1py/Services/SandboxService.py | Removes unused imports Iterable and TM1pyRestException |
| TM1py/Services/RestService.py | Fixes f-string formatting in warning message |
| TM1py/Services/ProcessService.py | Reorganizes imports alphabetically and fixes formatting issues |
| TM1py/Services/LoggerService.py | Fixes f-string formatting in URL assignments |
| TM1py/Services/HierarchyService.py | Fixes f-string formatting in error message |
| TM1py/Services/ElementService.py | Removes unused import and fixes f-string formatting |
| TM1py/Services/CellService.py | Reorganizes imports alphabetically and fixes various formatting issues |
| TM1py/Objects/ChoreStartTime.py | Replaces lambda with proper function definition |
| TM1py/Objects/Application.py | Fixes f-string formatting in deprecation warning |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
4cf4663 to
b5ebec3
Compare
… breaking existing code which rely on internals.
9a2e395 to
26b4f6e
Compare
|
Tests completed for environment: tm1-11-cloud. Check artifacts for details. |
Description
This PR adds the ruff linter to the project and fix all rule viloations.
Before
All violations were fixed