mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Enable the RUF003 lint in Ruff
This commit is contained in:
@@ -222,7 +222,7 @@ select = [
|
||||
# ruff-specific rules ('RUF')
|
||||
# "RUF001", # String contains ambiguous {}. Did you mean {}?
|
||||
"RUF002", # Docstring contains ambiguous {}. Did you mean {}?
|
||||
# "RUF003", # Comment contains ambiguous {}. Did you mean {}?
|
||||
"RUF003", # Comment contains ambiguous {}. Did you mean {}?
|
||||
"RUF005", # Consider `{expression}` instead of concatenation
|
||||
"RUF006", # Store a reference to the return value of `{expr}.{method}`
|
||||
"RUF007", # Prefer `itertools.pairwise()` over `zip()` when iterating over successive pairs
|
||||
|
@@ -167,11 +167,11 @@ def docname_to_domain(docname: str, compaction: bool | str) -> str:
|
||||
|
||||
# date_format mappings: ustrftime() to babel.dates.format_datetime()
|
||||
date_format_mappings = {
|
||||
'%a': 'EEE', # Weekday as locale’s abbreviated name.
|
||||
'%A': 'EEEE', # Weekday as locale’s full name.
|
||||
'%b': 'MMM', # Month as locale’s abbreviated name.
|
||||
'%B': 'MMMM', # Month as locale’s full name.
|
||||
'%c': 'medium', # Locale’s appropriate date and time representation.
|
||||
'%a': 'EEE', # Weekday as locale's abbreviated name.
|
||||
'%A': 'EEEE', # Weekday as locale's full name.
|
||||
'%b': 'MMM', # Month as locale's abbreviated name.
|
||||
'%B': 'MMMM', # Month as locale's full name.
|
||||
'%c': 'medium', # Locale's appropriate date and time representation.
|
||||
'%-d': 'd', # Day of the month as a decimal number.
|
||||
'%d': 'dd', # Day of the month as a zero-padded decimal number.
|
||||
'%-H': 'H', # Hour (24-hour clock) as a decimal number [0,23].
|
||||
@@ -184,7 +184,7 @@ date_format_mappings = {
|
||||
'%m': 'MM', # Month as a zero-padded decimal number.
|
||||
'%-M': 'm', # Minute as a decimal number [0,59].
|
||||
'%M': 'mm', # Minute as a zero-padded decimal number [00,59].
|
||||
'%p': 'a', # Locale’s equivalent of either AM or PM.
|
||||
'%p': 'a', # Locale's equivalent of either AM or PM.
|
||||
'%-S': 's', # Second as a decimal number.
|
||||
'%S': 'ss', # Second as a zero-padded decimal number.
|
||||
'%U': 'WW', # Week number of the year (Sunday as the first day of the week)
|
||||
@@ -196,8 +196,8 @@ date_format_mappings = {
|
||||
# Monday are considered to be in week 0.
|
||||
'%W': 'WW', # Week number of the year (Monday as the first day of the week)
|
||||
# as a zero-padded decimal number.
|
||||
'%x': 'medium', # Locale’s appropriate date representation.
|
||||
'%X': 'medium', # Locale’s appropriate time representation.
|
||||
'%x': 'medium', # Locale's appropriate date representation.
|
||||
'%X': 'medium', # Locale's appropriate time representation.
|
||||
'%y': 'YY', # Year without century as a zero-padded decimal number.
|
||||
'%Y': 'yyyy', # Year with century as a decimal number.
|
||||
'%Z': 'zzz', # Time zone name (no characters if no time zone exists).
|
||||
|
Reference in New Issue
Block a user