Skip to content

Commit 9934777

Browse files
remyleoneLaure-di
andauthored
chore: add support for ruff linter (#1137)
Co-authored-by: Laure-di <[email protected]>
1 parent aa005b7 commit 9934777

File tree

5 files changed

+23
-41
lines changed

5 files changed

+23
-41
lines changed

scaleway-core/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ ignore = [
5858
"PERF", # Perflint
5959
"PL", # Pylint
6060
"PT", # flake8-pytest-style
61-
"RUF", # Ruff-specific rules
6261
"S", # flake8-bandit
6362
"SIM", # flake8-simplify
6463
"SLF", # flake8-self
@@ -86,6 +85,7 @@ select = [
8685
"Q", # https://docs.astral.sh/ruff/rules/#flake8-quotes-q
8786
"RET", # https://docs.astral.sh/ruff/rules/#flake8-return-ret
8887
"RSE", # https://docs.astral.sh/ruff/rules/#flake8-raise-rse
88+
"RUF", # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
8989
"SLOT", # https://docs.astral.sh/ruff/rules/#flake8-slots-slot
9090
"T10", # https://docs.astral.sh/ruff/rules/#flake8-debugger-t10
9191
"T20", # https://docs.astral.sh/ruff/rules/#flake8-print-t20

scaleway-core/scaleway_core/bridge/__init__.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,25 @@
2626
from .decimal import marshal_Decimal
2727

2828
__all__ = [
29-
"Money",
30-
"unmarshal_Money",
31-
"marshal_Money",
32-
"Region",
3329
"ALL_REGIONS",
34-
"Zone",
3530
"ALL_ZONES",
31+
"Money",
32+
"Region",
3633
"ScwFile",
37-
"unmarshal_ScwFile",
38-
"marshal_ScwFile",
3934
"ServiceInfo",
40-
"unmarshal_ServiceInfo",
41-
"marshal_ServiceInfo",
42-
"TimeSeriesPoint",
4335
"TimeSeries",
44-
"unmarshal_TimeSeries",
36+
"TimeSeriesPoint",
37+
"Zone",
38+
"marshal_Decimal",
39+
"marshal_Money",
40+
"marshal_ScwFile",
41+
"marshal_ServiceInfo",
4542
"marshal_TimeSeries",
46-
"unmarshal_TimeSeriesPoint",
4743
"marshal_TimeSeriesPoint",
4844
"unmarshal_Decimal",
49-
"marshal_Decimal",
45+
"unmarshal_Money",
46+
"unmarshal_ScwFile",
47+
"unmarshal_ServiceInfo",
48+
"unmarshal_TimeSeries",
49+
"unmarshal_TimeSeriesPoint",
5050
]

scaleway-core/scaleway_core/profile/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
from .profile import Profile, ProfileConfig, ProfileDefaults
1212

1313
__all__ = [
14-
"Profile",
15-
"ProfileConfig",
16-
"ProfileDefaults",
17-
"ENV_KEY_SCW_CONFIG_PATH",
1814
"ENV_KEY_SCW_ACCESS_KEY",
19-
"ENV_KEY_SCW_SECRET_KEY",
2015
"ENV_KEY_SCW_API_URL",
16+
"ENV_KEY_SCW_CONFIG_PATH",
2117
"ENV_KEY_SCW_DEFAULT_ORGANIZATION_ID",
2218
"ENV_KEY_SCW_DEFAULT_PROJECT_ID",
2319
"ENV_KEY_SCW_DEFAULT_REGION",
2420
"ENV_KEY_SCW_DEFAULT_ZONE",
21+
"ENV_KEY_SCW_SECRET_KEY",
22+
"Profile",
23+
"ProfileConfig",
24+
"ProfileDefaults",
2525
]

scaleway-core/scaleway_core/utils/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
)
2222

2323
__all__ = [
24+
"OneOfPossibility",
25+
"StrEnumMeta",
26+
"WaitForOptions",
27+
"WaitForStopCondition",
2428
"fetch_all_pages",
2529
"fetch_all_pages_async",
2630
"project_or_organization_id",
2731
"random_name",
28-
"OneOfPossibility",
2932
"resolve_one_of",
30-
"StrEnumMeta",
3133
"validate_path_param",
32-
"WaitForOptions",
33-
"WaitForStopCondition",
3434
"wait_for_resource",
3535
"wait_for_resource_async",
3636
]

scaleway-core/scaleway_core/utils/random_name.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,6 @@
165165
"booth",
166166
# Anita Borg - Anita Borg was the founding director of the Institute for Women and Technology (IWT). https://en.wikipedia.org/wiki/Anita_Borg
167167
"borg",
168-
# Satyendra Nath Bose - He provided the foundation for Bose–Einstein statistics and the theory of the Bose–Einstein condensate. - https://en.wikipedia.org/wiki/Satyendra_Nath_Bose
169-
"bose",
170168
# Katherine Louise Bouman is an imaging scientist and Assistant Professor of Computer Science at the California Institute of Technology. She researches computational methods for imaging, and developed an algorithm that made possible the picture first visualization of a black hole using the Event Horizon Telescope. - https://en.wikipedia.org/wiki/Katie_Bouman
171169
"bouman",
172170
# Evelyn Boyd Granville - She was one of the first African-American woman to receive a Ph.D. in mathematics; she earned it in 1949 from Yale University. https://en.wikipedia.org/wiki/Evelyn_Boyd_Granville
@@ -193,8 +191,6 @@
193191
"cerf",
194192
# Subrahmanyan Chandrasekhar - Astrophysicist known for his mathematical theory on different stages and evolution in structures of the stars. He has won nobel prize for physics - https://en.wikipedia.org/wiki/Subrahmanyan_Chandrasekhar
195193
"chandrasekhar",
196-
# Sergey Alexeyevich Chaplygin (Russian: Серге́й Алексе́евич Чаплы́гин; April 5, 1869 – October 8, 1942) was a Russian and Soviet physicist, mathematician, and mechanical engineer. He is known for mathematical formulas such as Chaplygin's equation and for a hypothetical substance in cosmology called Chaplygin gas, named after him. https://en.wikipedia.org/wiki/Sergey_Chaplygin
197-
"chaplygin",
198194
# Émilie du Châtelet - French natural philosopher, mathematician, physicist, and author during the early 1730s, known for her translation of and commentary on Isaac Newton's book Principia containing basic laws of physics. https://en.wikipedia.org/wiki/%C3%89milie_du_Ch%C3%A2telet
199195
"chatelet",
200196
# Asima Chatterjee was an Indian organic chemist noted for her research on vinca alkaloids, development of drugs for treatment of epilepsy and malaria - https://en.wikipedia.org/wiki/Asima_Chatterjee
@@ -243,8 +239,6 @@
243239
"edison",
244240
# Albert Einstein invented the general theory of relativity. https://en.wikipedia.org/wiki/Albert_Einstein
245241
"einstein",
246-
# Alexandra Asanovna Elbakyan (Russian: Алекса́ндра Аса́новна Элбакя́н) is a Kazakhstani graduate student, computer programmer, internet pirate in hiding, and the creator of the site Sci-Hub. Nature has listed her in 2016 in the top ten people that mattered in science, and Ars Technica has compared her to Aaron Swartz. - https://en.wikipedia.org/wiki/Alexandra_Elbakyan
247-
"elbakyan",
248242
# Taher A. ElGamal - Egyptian cryptographer best known for the ElGamal discrete log cryptosystem and the ElGamal digital signature scheme. https://en.wikipedia.org/wiki/Taher_Elgamal
249243
"elgamal",
250244
# Gertrude Elion - American biochemist, pharmacologist and the 1988 recipient of the Nobel Prize in Medicine - https://en.wikipedia.org/wiki/Gertrude_Elion
@@ -351,12 +345,8 @@
351345
"jones",
352346
# A. P. J. Abdul Kalam - is an Indian scientist aka Missile Man of India for his work on the development of ballistic missile and launch vehicle technology - https://en.wikipedia.org/wiki/A._P._J._Abdul_Kalam
353347
"kalam",
354-
# Sergey Petrovich Kapitsa (Russian: Серге́й Петро́вич Капи́ца; 14 February 1928 – 14 August 2012) was a Russian physicist and demographer. He was best known as host of the popular and long-running Russian scientific TV show, Evident, but Incredible. His father was the Nobel laureate Soviet-era physicist Pyotr Kapitsa, and his brother was the geographer and Antarctic explorer Andrey Kapitsa. - https://en.wikipedia.org/wiki/Sergey_Kapitsa
355-
"kapitsa",
356348
# Susan Kare, created the icons and many of the interface elements for the original Apple Macintosh in the 1980s, and was an original employee of NeXT, working as the Creative Director. https://en.wikipedia.org/wiki/Susan_Kare
357349
"kare",
358-
# Mstislav Keldysh - a Soviet scientist in the field of mathematics and mechanics, academician of the USSR Academy of Sciences (1946), President of the USSR Academy of Sciences (1961–1975), three times Hero of Socialist Labor (1956, 1961, 1971), fellow of the Royal Society of Edinburgh (1968). https://en.wikipedia.org/wiki/Mstislav_Keldysh
359-
"keldysh",
360350
# Mary Kenneth Keller, Sister Mary Kenneth Keller became the first American woman to earn a PhD in Computer Science in 1965. https://en.wikipedia.org/wiki/Mary_Kenneth_Keller
361351
"keller",
362352
# Johannes Kepler, German astronomer known for his three laws of planetary motion - https://en.wikipedia.org/wiki/Johannes_Kepler
@@ -455,8 +445,6 @@
455445
"nobel",
456446
# Emmy Noether, German mathematician. Noether's Theorem is named after her. https://en.wikipedia.org/wiki/Emmy_Noether
457447
"noether",
458-
# Poppy Northcutt. Poppy Northcutt was the first woman to work as part of NASA’s Mission Control. http://www.businessinsider.com/poppy-northcutt-helped-apollo-astronauts-2014-12?op=1
459-
"northcutt",
460448
# Robert Noyce invented silicon integrated circuits and gave Silicon Valley its name. - https://en.wikipedia.org/wiki/Robert_Noyce
461449
"noyce",
462450
# Panini - Ancient Indian linguist and grammarian from 4th century CE who worked on the world's first formal system - https://en.wikipedia.org/wiki/P%C4%81%E1%B9%87ini#Comparison_with_modern_formal_systems
@@ -477,8 +465,6 @@
477465
"poincare",
478466
# Laura Poitras is a director and producer whose work, made possible by open source crypto tools, advances the causes of truth and freedom of information by reporting disclosures by whistleblowers such as Edward Snowden. https://en.wikipedia.org/wiki/Laura_Poitras
479467
"poitras",
480-
# Tat’yana Avenirovna Proskuriakova (Russian: Татья́на Авени́ровна Проскуряко́ва) (January 23 [O.S. January 10] 1909 – August 30, 1985) was a Russian-American Mayanist scholar and archaeologist who contributed significantly to the deciphering of Maya hieroglyphs, the writing system of the pre-Columbian Maya civilization of Mesoamerica. https://en.wikipedia.org/wiki/Tatiana_Proskouriakoff
481-
"proskuriakova",
482468
# Claudius Ptolemy - a Greco-Egyptian writer of Alexandria, known as a mathematician, astronomer, geographer, astrologer, and poet of a single epigram in the Greek Anthology - https://en.wikipedia.org/wiki/Ptolemy
483469
"ptolemy",
484470
# C. V. Raman - Indian physicist who won the Nobel Prize in 1930 for proposing the Raman effect. - https://en.wikipedia.org/wiki/C._V._Raman
@@ -517,8 +503,6 @@
517503
"shirley",
518504
# William Shockley co-invented the transistor - https://en.wikipedia.org/wiki/William_Shockley
519505
"shockley",
520-
# Lina Solomonovna Stern (or Shtern; Russian: Лина Соломоновна Штерн; 26 August 1878 – 7 March 1968) was a Soviet biochemist, physiologist and humanist whose medical discoveries saved thousands of lives at the fronts of World War II. She is best known for her pioneering work on blood–brain barrier, which she described as hemato-encephalic barrier in 1921. https://en.wikipedia.org/wiki/Lina_Stern
521-
"shtern",
522506
# Françoise Barré-Sinoussi - French virologist and Nobel Prize Laureate in Physiology or Medicine; her work was fundamental in identifying HIV as the cause of AIDS. https://en.wikipedia.org/wiki/Fran%C3%A7oise_Barr%C3%A9-Sinoussi
523507
"sinoussi",
524508
# Betty Snyder - one of the original programmers of the ENIAC. https://en.wikipedia.org/wiki/ENIAC - https://en.wikipedia.org/wiki/Betty_Holberton
@@ -587,8 +571,6 @@
587571
"yalow",
588572
# Ada Yonath - an Israeli crystallographer, the first woman from the Middle East to win a Nobel prize in the sciences. https://en.wikipedia.org/wiki/Ada_Yonath
589573
"yonath",
590-
# Nikolay Yegorovich Zhukovsky (Russian: Никола́й Его́рович Жуко́вский, January 17 1847 – March 17, 1921) was a Russian scientist, mathematician and engineer, and a founding father of modern aero- and hydrodynamics. Whereas contemporary scientists scoffed at the idea of human flight, Zhukovsky was the first to undertake the study of airflow. He is often called the Father of Russian Aviation. https://en.wikipedia.org/wiki/Nikolay_Yegorovich_Zhukovsky
591-
"zhukovsky",
592574
]
593575

594576
system_random = random.SystemRandom()

0 commit comments

Comments
 (0)