Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
Darwcss
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
Darwcss
Commits
3847336f
Kaydet (Commit)
3847336f
authored
5 years ago
tarafından
Batuhan Osman TASKAYA
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
format code
üst
4d666264
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
Jenkinsfile
Jenkinsfile
+1
-1
darwcss.py
darwcss/darwcss.py
+22
-3
No files found.
Jenkinsfile
Dosyayı görüntüle @
3847336f
...
@@ -22,7 +22,7 @@ pipeline {
...
@@ -22,7 +22,7 @@ pipeline {
stage
(
'flake8'
)
{
stage
(
'flake8'
)
{
steps
{
steps
{
sh
""". .venv/bin/activate
sh
""". .venv/bin/activate
flake8 --max-complexity 7 --output-file flake8_results.txt --ignore E501,F402 darwcss/
flake8 --max-complexity 7 --output-file flake8_results.txt --ignore E501,F402
,W291,E202
darwcss/
[ -f flake8_results.txt ] && flake8_junit flake8_results.txt test_flake8.xml;rm flake8_results.txt
[ -f flake8_results.txt ] && flake8_junit flake8_results.txt test_flake8.xml;rm flake8_results.txt
"""
"""
}
}
...
...
This diff is collapsed.
Click to expand it.
darwcss/darwcss.py
Dosyayı görüntüle @
3847336f
from
__future__
import
annotations
from
__future__
import
annotations
from
contextlib
import
contextmanager
from
contextlib
import
contextmanager
from
typing
import
List
,
Any
,
Union
,
Optional
,
Generator
,
Dict
,
Tuple
,
Sequence
,
Callable
from
typing
import
(
List
,
Any
,
Union
,
Optional
,
Generator
,
Dict
,
Tuple
,
Sequence
,
Callable
,
)
from
inspect
import
currentframe
from
inspect
import
currentframe
from
textwrap
import
indent
from
textwrap
import
indent
from
colorsys
import
rgb_to_hls
from
colorsys
import
rgb_to_hls
...
@@ -18,7 +28,13 @@ noqa:F821 = https://github.com/PyCQA/pyflakes/issues/373
...
@@ -18,7 +28,13 @@ noqa:F821 = https://github.com/PyCQA/pyflakes/issues/373
class
ArgumentMapping
(
UserDict
):
class
ArgumentMapping
(
UserDict
):
@classmethod
@classmethod
def
fill_rest
(
cls
,
keys
:
Sequence
,
values
:
Sequence
,
filler
:
Callable
[[
Any
],
Any
]
=
None
,
cleaner
:
Callable
[[
Any
],
Any
]
=
None
)
->
Dict
[
Any
,
Any
]:
def
fill_rest
(
cls
,
keys
:
Sequence
,
values
:
Sequence
,
filler
:
Callable
[[
Any
],
Any
]
=
None
,
cleaner
:
Callable
[[
Any
],
Any
]
=
None
,
)
->
Dict
[
Any
,
Any
]:
cleaner
=
cleaner
or
(
lambda
value
:
value
)
cleaner
=
cleaner
or
(
lambda
value
:
value
)
if
len
(
keys
)
!=
len
(
values
):
if
len
(
keys
)
!=
len
(
values
):
requested_keys
=
keys
[
len
(
keys
)
-
len
(
values
):]
requested_keys
=
keys
[
len
(
keys
)
-
len
(
values
):]
...
@@ -76,7 +92,10 @@ def init(*values, **kwds) -> None:
...
@@ -76,7 +92,10 @@ def init(*values, **kwds) -> None:
def
fake_init
(
cls
:
type
,
fields
:
Sequence
[
Field
])
->
object
:
def
fake_init
(
cls
:
type
,
fields
:
Sequence
[
Field
])
->
object
:
return
cls
(
**
dict
(
zip
(
map
(
attrgetter
(
"name"
),
fields
),
value_generator
(
fields
))))
# type: ignore
return
cls
(
**
dict
(
zip
(
map
(
attrgetter
(
"name"
),
fields
),
value_generator
(
fields
)))
# type: ignore
)
def
configurable_dataclass
(
*
args
,
**
kwargs
)
->
type
:
def
configurable_dataclass
(
*
args
,
**
kwargs
)
->
type
:
cls
=
dataclass
(
*
args
,
**
kwargs
)
cls
=
dataclass
(
*
args
,
**
kwargs
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment