Skip to content

Commit

Permalink
python/roman-numerals: 2nd iteration - py3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
vpayno committed Apr 13, 2024
1 parent 77258f7 commit 2985a23
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 113 deletions.
2 changes: 1 addition & 1 deletion python/roman-numerals/.coverage.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<coverage branch-rate="1" branches-covered="4" branches-valid="4" complexity="0" line-rate="0.9615" lines-covered="25" lines-valid="26" timestamp="1713022927789" version="4.5.4">
<coverage branch-rate="1" branches-covered="4" branches-valid="4" complexity="0" line-rate="0.9615" lines-covered="25" lines-valid="26" timestamp="1713023160375" version="4.5.4">
<!-- Generated by coverage.py: https://coverage.readthedocs.io -->
<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
<sources>
Expand Down
12 changes: 6 additions & 6 deletions python/roman-numerals/roman_numerals.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

from collections import OrderedDict

type modern_numeral_t = int # type: ignore[valid-type]
type roman_numeral_t = str # type: ignore[valid-type]
type map_d2r_t = OrderedDict[modern_numeral_t, roman_numeral_t] # type: ignore[valid-type]
ModernNumeralT = int
RomanNumeralT = str
MapD2RT = OrderedDict[ModernNumeralT, RomanNumeralT]


def roman(number: modern_numeral_t) -> roman_numeral_t:
rn: roman_numeral_t = ""
def roman(number: ModernNumeralT) -> RomanNumeralT:
rn: RomanNumeralT = ""

d2r: map_d2r_t = OrderedDict()
d2r: MapD2RT = OrderedDict()
d2r[1] = "I"
d2r[4] = "IV"
d2r[5] = "V"
Expand Down
12 changes: 6 additions & 6 deletions python/roman-numerals/roman_numerals.py,cover
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

> from collections import OrderedDict

> type modern_numeral_t = int # type: ignore[valid-type]
> type roman_numeral_t = str # type: ignore[valid-type]
> type map_d2r_t = OrderedDict[modern_numeral_t, roman_numeral_t] # type: ignore[valid-type]
> ModernNumeralT = int
> RomanNumeralT = str
> MapD2RT = OrderedDict[ModernNumeralT, RomanNumeralT]


> def roman(number: modern_numeral_t) -> roman_numeral_t:
> rn: roman_numeral_t = ""
> def roman(number: ModernNumeralT) -> RomanNumeralT:
> rn: RomanNumeralT = ""

> d2r: map_d2r_t = OrderedDict()
> d2r: MapD2RT = OrderedDict()
> d2r[1] = "I"
> d2r[4] = "IV"
> d2r[5] = "V"
Expand Down
Loading

0 comments on commit 2985a23

Please sign in to comment.