Skip to content

Commit

Permalink
add format cmd to makefile; format files
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Oct 14, 2024
1 parent 1f5fe3c commit c24cdf4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 20 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ lint-fix:
.PHONY: lint-check
lint-check:
ruff check habanero

format:
ruff format habanero
2 changes: 1 addition & 1 deletion habanero/cn/cn.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def content_negotiation(
style: str = "apa",
locale: str = "en-US",
url: str = None,
**kwargs
**kwargs,
) -> str:
"""
Get citations in various formats from CrossRef
Expand Down
2 changes: 1 addition & 1 deletion habanero/counts/counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def citation_count(
doi: str,
url: str = "http://www.crossref.org/openurl/",
key: str = "cboettig@ropensci.org",
**kwargs
**kwargs,
) -> int:
"""
Get a citation count with a DOI
Expand Down
34 changes: 17 additions & 17 deletions habanero/crossref/crossref.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def works(
cursor_max: float = 5000,
progress_bar: bool = False,
warn: bool = False,
**kwargs
**kwargs,
) -> dict:
"""
Search Crossref works
Expand Down Expand Up @@ -357,7 +357,7 @@ def works(
None,
progress_bar,
warn,
**kwargs
**kwargs,
)
else:
return Request(
Expand All @@ -378,7 +378,7 @@ def works(
cursor_max,
None,
progress_bar,
**kwargs
**kwargs,
).do_request(should_warn=warn)

def members(
Expand All @@ -398,7 +398,7 @@ def members(
cursor_max: float = 5000,
progress_bar: bool = False,
warn: bool = False,
**kwargs
**kwargs,
) -> dict:
"""
Search Crossref members
Expand Down Expand Up @@ -496,7 +496,7 @@ def members(
None,
progress_bar,
warn,
**kwargs
**kwargs,
)

def prefixes(
Expand All @@ -515,7 +515,7 @@ def prefixes(
cursor_max: float = 5000,
progress_bar: bool = False,
warn: bool = False,
**kwargs
**kwargs,
) -> dict:
"""
Search Crossref prefixes
Expand Down Expand Up @@ -613,7 +613,7 @@ def prefixes(
cursor_max=cursor_max,
progress_bar=progress_bar,
should_warn=warn,
**kwargs
**kwargs,
)

def funders(
Expand All @@ -633,7 +633,7 @@ def funders(
cursor_max: float = 5000,
progress_bar: bool = False,
warn: bool = False,
**kwargs
**kwargs,
) -> dict:
"""
Search Crossref funders
Expand Down Expand Up @@ -743,7 +743,7 @@ def funders(
None,
progress_bar,
warn,
**kwargs
**kwargs,
)

def journals(
Expand All @@ -763,7 +763,7 @@ def journals(
cursor_max: float = 5000,
progress_bar: bool = False,
warn: bool = False,
**kwargs
**kwargs,
) -> dict:
"""
Search Crossref journals
Expand Down Expand Up @@ -868,7 +868,7 @@ def journals(
None,
progress_bar,
warn,
**kwargs
**kwargs,
)

def types(
Expand All @@ -888,7 +888,7 @@ def types(
cursor_max: float = 5000,
progress_bar: bool = False,
warn: bool = False,
**kwargs
**kwargs,
) -> dict:
"""
Search Crossref types
Expand Down Expand Up @@ -972,7 +972,7 @@ def types(
None,
progress_bar,
warn,
**kwargs
**kwargs,
)

def licenses(
Expand All @@ -983,7 +983,7 @@ def licenses(
sort: str = None,
order: str = None,
facet: Union[str, bool] = None,
**kwargs
**kwargs,
) -> dict:
"""
Search Crossref licenses
Expand Down Expand Up @@ -1028,7 +1028,7 @@ def licenses(
None,
None,
None,
**kwargs
**kwargs,
)
return res

Expand Down Expand Up @@ -1081,7 +1081,7 @@ def registration_agency(self, ids: Union[List[str], str], **kwargs) -> list:
None,
None,
True,
**kwargs
**kwargs,
)
if not isinstance(res, list):
k = []
Expand Down Expand Up @@ -1127,7 +1127,7 @@ def random_dois(self, sample: int = 10, **kwargs) -> list:
None,
None,
None,
**kwargs
**kwargs,
)
return [z["DOI"] for z in res["message"]["items"]]

Expand Down
2 changes: 1 addition & 1 deletion habanero/request_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(
cursor_max=None,
agency=False,
progress_bar=False,
**kwargs
**kwargs,
):
self.mailto = mailto
self.ua_string = ua_string
Expand Down

0 comments on commit c24cdf4

Please sign in to comment.