Skip to content

Commit

Permalink
chore(lint): replace flake8, black and isort by ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
deveaud-m committed Apr 4, 2024
1 parent 288320a commit 0c94c10
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 171 deletions.
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

8 changes: 2 additions & 6 deletions .github/workflows/staticchecks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ jobs:
python -m pip install --upgrade pip
pip install poetry
poetry install --with=dev
- name: Check format with black
run: poetry run poe format
- name: Lint with flake8
run: poetry run poe style
- name: Sort imports with isort
run: poetry run poe imports
- name: Lint using ruff
run: poetry run ruff check
- name: Check types with mypy
run: poetry run poe types
1 change: 0 additions & 1 deletion fossology/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ def fossology_token(
class Fossology(
Folders, Groups, Items, LicenseEndpoint, Uploads, Jobs, Report, Users, Search
):

"""Main Fossology API class
Authentication against a running Fossology instance is performed using an API token.
Expand Down
24 changes: 0 additions & 24 deletions fossology/obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@


class Agents(object):

"""FOSSology agents.
Represents the agents currently configured for a given user.
Expand Down Expand Up @@ -98,7 +97,6 @@ def to_json(self):


class User(object):

"""FOSSology user.
Represents the user currently authenticated against the FOSSology server.
Expand Down Expand Up @@ -161,7 +159,6 @@ def from_json(cls, json_dict):


class UserGroupMember(object):

"""FOSSology group member.
Represents a member of a group.
Expand Down Expand Up @@ -193,7 +190,6 @@ def from_json(cls, json_dict):


class Folder(object):

"""FOSSology folder.
Represents a FOSSology folder.
Expand Down Expand Up @@ -229,7 +225,6 @@ def from_json(cls, json_dict):


class Findings(object):

"""FOSSology license findings.
Represents FOSSology license findings.
Expand Down Expand Up @@ -268,7 +263,6 @@ def from_json(cls, json_dict):


class Group(object):

"""FOSSology group.
Represents a FOSSology group.
Expand Down Expand Up @@ -349,7 +343,6 @@ def from_json(cls, json_dict):


class License(object):

"""FOSSology license.
Represents a FOSSology license.
Expand Down Expand Up @@ -417,7 +410,6 @@ def to_json(self) -> str:


class Obligation(object):

"""FOSSology license obligation.
Represents a FOSSology license obligation.
Expand Down Expand Up @@ -456,7 +448,6 @@ def from_json(cls, json_dict):


class Hash(object):

"""FOSSology hash.
Represents a FOSSology file hash values.
Expand Down Expand Up @@ -496,7 +487,6 @@ def from_json(cls, json_dict):


class File(object):

"""FOSSology file response from filesearch.
Represents a FOSSology filesearch response.
Expand Down Expand Up @@ -531,7 +521,6 @@ def from_json(cls, json_dict):


class FileInfo(object):

"""FOSSology file info response.
Represents a FOSSology file info response.
Expand Down Expand Up @@ -582,7 +571,6 @@ def from_json(cls, json_dict):


class Upload(object):

"""FOSSology upload.
Represents a FOSSology upload.
Expand Down Expand Up @@ -655,7 +643,6 @@ def from_json(cls, json_dict):


class UploadCopyrights(object):

"""Copyright findings in a FOSSology upload
Represents copyright matches of a FOSSology upload.
Expand Down Expand Up @@ -689,7 +676,6 @@ def from_json(cls, json_dict):


class UploadLicenses(object):

"""FOSSology upload licenses.
Represents licenses and copyright matches of a FOSSology upload.
Expand Down Expand Up @@ -721,7 +707,6 @@ def from_json(cls, json_dict):


class Summary(object):

"""FOSSology upload summary.
Represents a FOSSology upload summary.
Expand Down Expand Up @@ -792,7 +777,6 @@ def from_json(cls, json_dict):


class Job(object):

"""FOSSology job.
Represents a FOSSology job.
Expand Down Expand Up @@ -842,7 +826,6 @@ def from_json(cls, json_dict):


class ApiLicense(object):

"""FOSSology API License.
:param name: name of the API license
Expand All @@ -864,7 +847,6 @@ def from_json(cls, json_dict):


class FossologyServer(object):

"""FOSSology server info.
:param version: version of the FOSSology server (e.g. 4.0.0)
Expand Down Expand Up @@ -895,7 +877,6 @@ def from_json(cls, json_dict):


class ApiInfo(object):

"""FOSSology API info.
Represents the info endpoint of FOSSology API.
Expand Down Expand Up @@ -946,7 +927,6 @@ def from_json(cls, json_dict):


class Status(object):

"""FOSSology server status
Represent the status of FOSSology sub-systems
Expand All @@ -964,7 +944,6 @@ def from_json(cls, json_dict):


class HealthInfo(object):

"""FOSSology server health info.
Represents the health endpoint of FOSSology API.
Expand Down Expand Up @@ -992,7 +971,6 @@ def from_json(cls, json_dict):


class SearchResult(object):

"""Search result.
Represents a search response from FOSSology API.
Expand Down Expand Up @@ -1022,7 +1000,6 @@ def from_json(cls, json_dict):


class GetClearingHistory(object):

"""Clearing history.
Represents the clearing history of a specified item.
Expand Down Expand Up @@ -1070,7 +1047,6 @@ def from_json(cls, json_dict):


class GetBulkHistory(object):

"""Bulk history.
Represents the bulk history of a specified item.
Expand Down
Loading

0 comments on commit 0c94c10

Please sign in to comment.