Skip to content

Commit

Permalink
Merge pull request #297 from blablatdinov/281-python-linter
Browse files Browse the repository at this point in the history
Ruff linter for python
  • Loading branch information
yegor256 authored Feb 14, 2025
2 parents 425e44e + 849fdab commit 87ff553
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 10 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ name: pages
tags:
- '*'
release:
branches:
- master
tags:
- '*'
jobs:
pages:
timeout-minutes: 15
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/python-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# The MIT License (MIT)
#
# Copyright (c) 2016-2025 Objectionary.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
---
name: python-lint
'on':
push:
branches:
- master
pull_request:
branches:
- master
jobs:
python-lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12.5"
- name: Install wemake-python-styleguide
run: pip install ruff==0.9.4
- name: Run ruff
run: ruff check py
2 changes: 1 addition & 1 deletion .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
committer: yegor256 <[email protected]>
commit-message: New release for ${{ env.eo_lib_version }}
title: New release for ${{ env.eo_lib_version }}
body: A new release `${{ env.eo_lib_version }}` of the EO-to-Java compiler has been published on Maven Central. Don't forget to make a release here, asking `@rultor` about it.
body: A new release `${{ env.eo_lib_version }}` of the EO-to-Java compiler has been published on Maven Central. Don't forget to make a release here, asking `@rultor` about it. # yamllint disable-line rule:line-length
base: master
branch: update-${{ env.eo_lib_version }}
delete-branch: true
4 changes: 0 additions & 4 deletions .github/workflows/tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ name: tags
tags:
- '*'
release:
branches:
- master
tags:
- '*'
jobs:
tags:
timeout-minutes: 15
Expand Down
26 changes: 26 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# The MIT License (MIT)
#
# Copyright (c) 2016-2025 Objectionary.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
---
extends: default
rules:
line-length:
max: 120
2 changes: 1 addition & 1 deletion py/deps_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
# SOFTWARE.

import unittest
from unittest.mock import patch
import sys
from unittest.mock import patch # noqa: F401
sys.path.insert(0, './py/')
from deps import dependencies

Expand Down

0 comments on commit 87ff553

Please sign in to comment.