Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5d4ac83

Browse files
clean ruff UP
1 parent 86f6d88 commit 5d4ac83

File tree

11 files changed

+17
-27
lines changed

11 files changed

+17
-27
lines changed

‎agregation-option-calcul-formel/media/GroupeSymetrique-correction.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Option Algèbre et Calcul Formel de l’Agrégation de Mathématiques:
43
Sa Majesté le Groupe Symmétrique; groupes de permutations

‎agregation-option-calcul-formel/media/GroupeSymetrique.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Option Algèbre et Calcul Formel de l’Agrégation de Mathématiques:
43
Sa Majesté le Groupe Symmétrique; groupes de permutations

‎agregation-option-calcul-formel/media/bleachermark.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def signal_ctrl_c(signal, frame):
7474
signal.signal(signal.SIGINT, signal_ctrl_c)
7575

7676

77-
class Benchmark():
77+
class Benchmark:
7878
r"""
7979
A Benchmark is a pipeline of functions.
8080
@@ -107,9 +107,9 @@ def __init__(self, pipeline, label=None, fun_labels=None):
107107

108108
def __repr__(self):
109109
if self.label():
110-
return 'Benchmark {}'.format(self.label())
110+
return f'Benchmark {self.label()}'
111111
else:
112-
return 'Benchmark for a pipeline of {} functions'.format(len(self._pipeline))
112+
return f'Benchmark for a pipeline of {len(self._pipeline)} functions'
113113

114114
def label(self):
115115
r"""
@@ -192,7 +192,7 @@ def __init__(self, benchmarks):
192192
self._current_runner = None
193193

194194
def __repr__(self):
195-
return 'Collection of {} benchmarks'.format(self.size())
195+
return f'Collection of {self.size()} benchmarks'
196196

197197
def size(self):
198198
return len(self._benchmarks)
@@ -312,7 +312,7 @@ def fetch_data(self, format="dict"):
312312
data.append((label, fun_labels[i], run[0], m[0], m[1]))
313313
return data
314314
else:
315-
raise ValueError("Invalid argument to format: {}".format(format))
315+
raise ValueError(f"Invalid argument to format: {format}")
316316

317317
def timings(self, transposed=False):
318318
r"""
@@ -609,7 +609,7 @@ def __iter__(self):
609609
return self
610610

611611
def __repr__(self):
612-
return 'Serial Runner of {} instances for {}'.format(self._niter, self._bleachermark)
612+
return f'Serial Runner of {self._niter} instances for {self._bleachermark}'
613613

614614
def next(self):
615615
if self._current_iter >= self._niter:
@@ -655,7 +655,7 @@ def __iter__(self):
655655
return self
656656

657657
def __repr__(self):
658-
return 'List Runner for {}'.format(self._bleachermark)
658+
return f'List Runner for {self._bleachermark}'
659659

660660
def next(self):
661661
if self._nbench == len(self._benchmarks) - 1:
@@ -735,7 +735,7 @@ def __init__(self, bleachermark, totruns=100):
735735
self._pendingruns = totruns
736736

737737
def repr(self):
738-
return "Adaptative Runner for {} benchmarks".format(len(self._benchmarks))
738+
return f"Adaptative Runner for {len(self._benchmarks)} benchmarks"
739739

740740
def __iter__(self):
741741
return self

‎agregation-option-calcul-formel/media/codes_correcteurs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
r"""
32
Some code for drawing binary codes in 3D
43

‎agregation-option-calcul-formel/media/programmation_lineaire.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from copy import copy
32

43
from sage.rings.integer_ring import ZZ

‎agregation-option-calcul-formel/media/recherche.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- encoding: utf-8 -*-
21

32

43
def recherche(liste, val):

‎agregation-option-calcul-formel/media/tris.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- encoding: utf-8 -*-
21

32
def tri_bulle(liste):
43
"""

‎agregation-option-calcul-formel/media/wiedemann.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from sage.all import QQ
32

43

‎conf.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
#
32
# More Sage Thematic Tutorials documentation build configuration file, created by
43
# sphinx-quickstart on Fri Apr 28 17:20:28 2017.
@@ -48,18 +47,18 @@
4847
master_doc = 'index'
4948

5049
# General information about the project.
51-
project = u'More Sage Thematic Tutorials'
52-
copyright = u'2017, The Sage Community'
53-
author = u'The Sage Community'
50+
project = 'More Sage Thematic Tutorials'
51+
copyright = '2017, The Sage Community'
52+
author = 'The Sage Community'
5453

5554
# The version info for the project you're documenting, acts as replacement for
5655
# |version| and |release|, also used in various other places throughout the
5756
# built documents.
5857
#
5958
# The short X.Y version.
60-
version = u'0.1'
59+
version = '0.1'
6160
# The full version, including alpha/beta/rc tags.
62-
release = u'0.1'
61+
release = '0.1'
6362

6463
# The language for content autogenerated by Sphinx. Refer to documentation
6564
# for a list of supported languages.
@@ -234,8 +233,8 @@
234233
# (source start file, target name, title,
235234
# author, documentclass [howto, manual, or own class]).
236235
latex_documents = [
237-
(master_doc, 'MoreSageThematicTutorials.tex', u'More Sage Thematic Tutorials Documentation',
238-
u'The Sage Community', 'manual'),
236+
(master_doc, 'MoreSageThematicTutorials.tex', 'More Sage Thematic Tutorials Documentation',
237+
'The Sage Community', 'manual'),
239238
]
240239

241240
# The name of an image file (relative to this directory) to place at the top of
@@ -264,7 +263,7 @@
264263
# One entry per manual page. List of tuples
265264
# (source start file, name, description, authors, manual section).
266265
man_pages = [
267-
(master_doc, 'moresagethematictutorials', u'More Sage Thematic Tutorials Documentation',
266+
(master_doc, 'moresagethematictutorials', 'More Sage Thematic Tutorials Documentation',
268267
[author], 1)
269268
]
270269

@@ -278,7 +277,7 @@
278277
# (source start file, target name, title, author,
279278
# dir menu entry, description, category)
280279
texinfo_documents = [
281-
(master_doc, 'MoreSageThematicTutorials', u'More Sage Thematic Tutorials Documentation',
280+
(master_doc, 'MoreSageThematicTutorials', 'More Sage Thematic Tutorials Documentation',
282281
author, 'MoreSageThematicTutorials', 'One line description of project.',
283282
'Miscellaneous'),
284283
]

‎mocksage/combinat/tutorial_enumerated_sets.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
r"""
32
.. _sage.combinat.tutorial_enumerated_sets:
43

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /