mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #8728 from tk0miya/mypy-0.800
Fix mypy violations (with mypy-0.800)
This commit is contained in:
commit
aebfbbb532
2
setup.py
2
setup.py
@ -44,7 +44,7 @@ extras_require = {
|
|||||||
'lint': [
|
'lint': [
|
||||||
'flake8>=3.5.0',
|
'flake8>=3.5.0',
|
||||||
'isort',
|
'isort',
|
||||||
'mypy>=0.790',
|
'mypy>=0.800',
|
||||||
'docutils-stubs',
|
'docutils-stubs',
|
||||||
],
|
],
|
||||||
'test': [
|
'test': [
|
||||||
|
@ -92,7 +92,7 @@ class Stylesheet(str):
|
|||||||
filename = None # type: str
|
filename = None # type: str
|
||||||
|
|
||||||
def __new__(cls, filename: str, *args: str, **attributes: str) -> "Stylesheet":
|
def __new__(cls, filename: str, *args: str, **attributes: str) -> "Stylesheet":
|
||||||
self = str.__new__(cls, filename) # type: ignore
|
self = str.__new__(cls, filename)
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
self.attributes = attributes
|
self.attributes = attributes
|
||||||
self.attributes.setdefault('rel', 'stylesheet')
|
self.attributes.setdefault('rel', 'stylesheet')
|
||||||
@ -115,7 +115,7 @@ class JavaScript(str):
|
|||||||
filename = None # type: str
|
filename = None # type: str
|
||||||
|
|
||||||
def __new__(cls, filename: str, **attributes: str) -> "JavaScript":
|
def __new__(cls, filename: str, **attributes: str) -> "JavaScript":
|
||||||
self = str.__new__(cls, filename) # type: ignore
|
self = str.__new__(cls, filename)
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
self.attributes = attributes
|
self.attributes = attributes
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ if False:
|
|||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
LocaleFileInfoBase = namedtuple('CatalogInfo', 'base_dir,domain,charset')
|
LocaleFileInfoBase = namedtuple('LocaleFileInfoBase', 'base_dir,domain,charset')
|
||||||
|
|
||||||
|
|
||||||
class CatalogInfo(LocaleFileInfoBase):
|
class CatalogInfo(LocaleFileInfoBase):
|
||||||
|
Loading…
Reference in New Issue
Block a user