ci: update mypy config and make ruff config more consistent with other projects
This commit is contained in:
parent
d58453410c
commit
e4cdb74ea3
13 changed files with 32 additions and 38 deletions
|
@ -6,7 +6,7 @@ warnings.high('my.coding.github is deprecated! Please use my.github.all instead!
|
|||
# todo why aren't DeprecationWarning shown by default??
|
||||
|
||||
if not TYPE_CHECKING:
|
||||
from ..github.all import events, get_events
|
||||
from ..github.all import events, get_events # noqa: F401
|
||||
|
||||
# todo deprecate properly
|
||||
iter_events = events
|
||||
|
|
|
@ -10,7 +10,7 @@ This file is used for:
|
|||
- for loading the actual user config
|
||||
'''
|
||||
#### NOTE: you won't need this line VVVV in your personal config
|
||||
from my.core import init
|
||||
from my.core import init # noqa: F401
|
||||
###
|
||||
|
||||
|
||||
|
|
|
@ -577,7 +577,7 @@ def query_hpi_functions(
|
|||
# output == 'repl'
|
||||
eprint(f"\nInteract with the results by using the {click.style('res', fg='green')} variable\n")
|
||||
try:
|
||||
import IPython # type: ignore[import]
|
||||
import IPython # type: ignore[import,unused-ignore]
|
||||
except ModuleNotFoundError:
|
||||
eprint("'repl' typically uses ipython, install it with 'python3 -m pip install ipython'. falling back to stdlib...")
|
||||
import code
|
||||
|
|
|
@ -120,7 +120,7 @@ class CPath(BasePath):
|
|||
Path only has _accessor and _closed slots, so can't directly set .open method
|
||||
_accessor.open has to return file descriptor, doesn't work for compressed stuff.
|
||||
"""
|
||||
def open(self, *args, **kwargs):
|
||||
def open(self, *args, **kwargs): # noqa: ARG002
|
||||
kopen_kwargs = {}
|
||||
mode = kwargs.get('mode')
|
||||
if mode is not None:
|
||||
|
|
|
@ -8,7 +8,6 @@ from pathlib import Path
|
|||
|
||||
import pytest
|
||||
import pytz
|
||||
from more_itertools import ilen
|
||||
|
||||
import my.config
|
||||
from my.core import notnone
|
||||
|
|
|
@ -47,5 +47,5 @@ class DummyExecutor(Executor):
|
|||
|
||||
return f
|
||||
|
||||
def shutdown(self, wait: bool = True, **kwargs) -> None: # noqa: FBT001,FBT002
|
||||
def shutdown(self, wait: bool = True, **kwargs) -> None: # noqa: FBT001,FBT002,ARG002
|
||||
self._shutdown = True
|
||||
|
|
|
@ -3,7 +3,6 @@ Just a demo module for testing and documentation purposes
|
|||
'''
|
||||
|
||||
import json
|
||||
from abc import abstractmethod
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime, timezone, tzinfo
|
||||
from pathlib import Path
|
||||
|
|
|
@ -31,7 +31,7 @@ def inputs() -> Sequence[Path]:
|
|||
|
||||
# todo add a doctor check for pip endoexport module
|
||||
import endoexport.dal as dal
|
||||
from endoexport.dal import Point, Workout
|
||||
from endoexport.dal import Point, Workout # noqa: F401
|
||||
|
||||
|
||||
from .core import Res
|
||||
|
|
|
@ -4,7 +4,6 @@ Foursquare/Swarm checkins
|
|||
|
||||
from datetime import datetime, timezone, timedelta
|
||||
from itertools import chain
|
||||
from pathlib import Path
|
||||
import json
|
||||
|
||||
# TODO pytz for timezone???
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from typing import Protocol
|
||||
|
||||
from my.core import datetime_aware, Json
|
||||
from my.core import datetime_aware
|
||||
|
||||
|
||||
def hackernews_link(id: str) -> str:
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
from pathlib import Path
|
||||
# from kython.plotting import *
|
||||
from csv import DictReader
|
||||
from itertools import islice
|
||||
|
||||
from typing import Dict, Any, NamedTuple
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue