File tree Expand file tree Collapse file tree 5 files changed +27
-42
lines changed Expand file tree Collapse file tree 5 files changed +27
-42
lines changed Original file line number Diff line number Diff line change @@ -43,15 +43,15 @@ repos:
4343 - id : prettier
4444 types_or : [javascript, css]
4545- repo : https://github.com/pre-commit/mirrors-eslint
46- rev : v8.7 .0
46+ rev : v8.9 .0
4747 hooks :
4848 - id : eslint
4949 files : \.js?$
5050 types : [file]
5151 args :
5252 - --fix
5353- repo : https://github.com/psf/black
54- rev : 21.12b0
54+ rev : 22.1.0
5555 hooks :
5656 - id : black
5757 language_version : python3
Original file line number Diff line number Diff line change @@ -236,26 +236,20 @@ def _store_call_info(
236236 @property
237237 def nav_subtitle (self ):
238238 cache_calls = len (self .calls )
239- return (
240- ngettext (
241- "%(cache_calls)d call in %(time).2fms" ,
242- "%(cache_calls)d calls in %(time).2fms" ,
243- cache_calls ,
244- )
245- % {"cache_calls" : cache_calls , "time" : self .total_time }
246- )
239+ return ngettext (
240+ "%(cache_calls)d call in %(time).2fms" ,
241+ "%(cache_calls)d calls in %(time).2fms" ,
242+ cache_calls ,
243+ ) % {"cache_calls" : cache_calls , "time" : self .total_time }
247244
248245 @property
249246 def title (self ):
250247 count = len (getattr (settings , "CACHES" , ["default" ]))
251- return (
252- ngettext (
253- "Cache calls from %(count)d backend" ,
254- "Cache calls from %(count)d backends" ,
255- count ,
256- )
257- % {"count" : count }
258- )
248+ return ngettext (
249+ "Cache calls from %(count)d backend" ,
250+ "Cache calls from %(count)d backends" ,
251+ count ,
252+ ) % {"count" : count }
259253
260254 def enable_instrumentation (self ):
261255 for alias in cache .caches :
Original file line number Diff line number Diff line change @@ -53,22 +53,16 @@ def nav_subtitle(self):
5353 # here we have to handle a double count translation, hence the
5454 # hard coding of one signal
5555 if num_signals == 1 :
56- return (
57- ngettext (
58- "%(num_receivers)d receiver of 1 signal" ,
59- "%(num_receivers)d receivers of 1 signal" ,
60- num_receivers ,
61- )
62- % {"num_receivers" : num_receivers }
63- )
64- return (
65- ngettext (
66- "%(num_receivers)d receiver of %(num_signals)d signals" ,
67- "%(num_receivers)d receivers of %(num_signals)d signals" ,
56+ return ngettext (
57+ "%(num_receivers)d receiver of 1 signal" ,
58+ "%(num_receivers)d receivers of 1 signal" ,
6859 num_receivers ,
69- )
70- % {"num_receivers" : num_receivers , "num_signals" : num_signals }
71- )
60+ ) % {"num_receivers" : num_receivers }
61+ return ngettext (
62+ "%(num_receivers)d receiver of %(num_signals)d signals" ,
63+ "%(num_receivers)d receivers of %(num_signals)d signals" ,
64+ num_receivers ,
65+ ) % {"num_receivers" : num_receivers , "num_signals" : num_signals }
7266
7367 title = _ ("Signals" )
7468
Original file line number Diff line number Diff line change @@ -122,14 +122,11 @@ def nav_subtitle(self):
122122 @property
123123 def title (self ):
124124 count = len (self ._databases )
125- return (
126- ngettext (
127- "SQL queries from %(count)d connection" ,
128- "SQL queries from %(count)d connections" ,
129- count ,
130- )
131- % {"count" : count }
132- )
125+ return ngettext (
126+ "SQL queries from %(count)d connection" ,
127+ "SQL queries from %(count)d connections" ,
128+ count ,
129+ ) % {"count" : count }
133130
134131 template = "debug_toolbar/panels/sql.html"
135132
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ def getframeinfo(frame, context=1):
210210 for line in first_lines [:2 ]:
211211 # File coding may be specified. Match pattern from PEP-263
212212 # (https://www.python.org/dev/peps/pep-0263/)
213- match = re .search (br "coding[:=]\s*([-\w.]+)" , line )
213+ match = re .search (rb "coding[:=]\s*([-\w.]+)" , line )
214214 if match :
215215 encoding = match .group (1 ).decode ("ascii" )
216216 break
You can’t perform that action at this time.
0 commit comments