Skip to content

Commit fa3cf93

Browse files
authored
Merge pull request #131 from fossology/chore/introduce-ruff
chore(lint): replace flake8, black and isort by ruff
2 parents 288320a + 0c94c10 commit fa3cf93

File tree

7 files changed

+32
-171
lines changed

7 files changed

+32
-171
lines changed

.flake8

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/staticchecks.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@ jobs:
2828
python -m pip install --upgrade pip
2929
pip install poetry
3030
poetry install --with=dev
31-
- name: Check format with black
32-
run: poetry run poe format
33-
- name: Lint with flake8
34-
run: poetry run poe style
35-
- name: Sort imports with isort
36-
run: poetry run poe imports
31+
- name: Lint using ruff
32+
run: poetry run ruff check
3733
- name: Check types with mypy
3834
run: poetry run poe types

fossology/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ def fossology_token(
106106
class Fossology(
107107
Folders, Groups, Items, LicenseEndpoint, Uploads, Jobs, Report, Users, Search
108108
):
109-
110109
"""Main Fossology API class
111110
112111
Authentication against a running Fossology instance is performed using an API token.

fossology/obj.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010

1111
class Agents(object):
12-
1312
"""FOSSology agents.
1413
1514
Represents the agents currently configured for a given user.
@@ -98,7 +97,6 @@ def to_json(self):
9897

9998

10099
class User(object):
101-
102100
"""FOSSology user.
103101
104102
Represents the user currently authenticated against the FOSSology server.
@@ -161,7 +159,6 @@ def from_json(cls, json_dict):
161159

162160

163161
class UserGroupMember(object):
164-
165162
"""FOSSology group member.
166163
167164
Represents a member of a group.
@@ -193,7 +190,6 @@ def from_json(cls, json_dict):
193190

194191

195192
class Folder(object):
196-
197193
"""FOSSology folder.
198194
199195
Represents a FOSSology folder.
@@ -229,7 +225,6 @@ def from_json(cls, json_dict):
229225

230226

231227
class Findings(object):
232-
233228
"""FOSSology license findings.
234229
235230
Represents FOSSology license findings.
@@ -268,7 +263,6 @@ def from_json(cls, json_dict):
268263

269264

270265
class Group(object):
271-
272266
"""FOSSology group.
273267
274268
Represents a FOSSology group.
@@ -349,7 +343,6 @@ def from_json(cls, json_dict):
349343

350344

351345
class License(object):
352-
353346
"""FOSSology license.
354347
355348
Represents a FOSSology license.
@@ -417,7 +410,6 @@ def to_json(self) -> str:
417410

418411

419412
class Obligation(object):
420-
421413
"""FOSSology license obligation.
422414
423415
Represents a FOSSology license obligation.
@@ -456,7 +448,6 @@ def from_json(cls, json_dict):
456448

457449

458450
class Hash(object):
459-
460451
"""FOSSology hash.
461452
462453
Represents a FOSSology file hash values.
@@ -496,7 +487,6 @@ def from_json(cls, json_dict):
496487

497488

498489
class File(object):
499-
500490
"""FOSSology file response from filesearch.
501491
502492
Represents a FOSSology filesearch response.
@@ -531,7 +521,6 @@ def from_json(cls, json_dict):
531521

532522

533523
class FileInfo(object):
534-
535524
"""FOSSology file info response.
536525
537526
Represents a FOSSology file info response.
@@ -582,7 +571,6 @@ def from_json(cls, json_dict):
582571

583572

584573
class Upload(object):
585-
586574
"""FOSSology upload.
587575
588576
Represents a FOSSology upload.
@@ -655,7 +643,6 @@ def from_json(cls, json_dict):
655643

656644

657645
class UploadCopyrights(object):
658-
659646
"""Copyright findings in a FOSSology upload
660647
661648
Represents copyright matches of a FOSSology upload.
@@ -689,7 +676,6 @@ def from_json(cls, json_dict):
689676

690677

691678
class UploadLicenses(object):
692-
693679
"""FOSSology upload licenses.
694680
695681
Represents licenses and copyright matches of a FOSSology upload.
@@ -721,7 +707,6 @@ def from_json(cls, json_dict):
721707

722708

723709
class Summary(object):
724-
725710
"""FOSSology upload summary.
726711
727712
Represents a FOSSology upload summary.
@@ -792,7 +777,6 @@ def from_json(cls, json_dict):
792777

793778

794779
class Job(object):
795-
796780
"""FOSSology job.
797781
798782
Represents a FOSSology job.
@@ -842,7 +826,6 @@ def from_json(cls, json_dict):
842826

843827

844828
class ApiLicense(object):
845-
846829
"""FOSSology API License.
847830
848831
:param name: name of the API license
@@ -864,7 +847,6 @@ def from_json(cls, json_dict):
864847

865848

866849
class FossologyServer(object):
867-
868850
"""FOSSology server info.
869851
870852
:param version: version of the FOSSology server (e.g. 4.0.0)
@@ -895,7 +877,6 @@ def from_json(cls, json_dict):
895877

896878

897879
class ApiInfo(object):
898-
899880
"""FOSSology API info.
900881
901882
Represents the info endpoint of FOSSology API.
@@ -946,7 +927,6 @@ def from_json(cls, json_dict):
946927

947928

948929
class Status(object):
949-
950930
"""FOSSology server status
951931
952932
Represent the status of FOSSology sub-systems
@@ -964,7 +944,6 @@ def from_json(cls, json_dict):
964944

965945

966946
class HealthInfo(object):
967-
968947
"""FOSSology server health info.
969948
970949
Represents the health endpoint of FOSSology API.
@@ -992,7 +971,6 @@ def from_json(cls, json_dict):
992971

993972

994973
class SearchResult(object):
995-
996974
"""Search result.
997975
998976
Represents a search response from FOSSology API.
@@ -1022,7 +1000,6 @@ def from_json(cls, json_dict):
10221000

10231001

10241002
class GetClearingHistory(object):
1025-
10261003
"""Clearing history.
10271004
10281005
Represents the clearing history of a specified item.
@@ -1070,7 +1047,6 @@ def from_json(cls, json_dict):
10701047

10711048

10721049
class GetBulkHistory(object):
1073-
10741050
"""Bulk history.
10751051
10761052
Represents the bulk history of a specified item.

0 commit comments

Comments
 (0)