Skip to content

Commit a54a98c

Browse files
committed
Enforcing UTF-8 encoding when opening file
1 parent 1cb4fdf commit a54a98c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Legend:
8989
| `n_a` | Number of abstracts | Number of protocols in the framework |
9090
| `n_c` | Number of concretes | Number of struct and classes in the framework |
9191
| `a` | Abstractness | A = n_a / n_c |
92-
| `d_3` | Distance from the main sequence | D³ = |A+I-1| |
92+
| `d_3` | Distance from the main sequence | D³ = abs( A + I - 1 ) |
9393
| `nbm` | Number of methods | Number of `func` (computed `var` excluded) |
9494

9595
## Current limitations

swift_code_metrics/_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def parse(self):
5454
loc = 0
5555

5656
commented_line = False
57-
with open(self.file) as f:
57+
with open(self.file, encoding='utf-8') as f:
5858
for line in f:
5959
trimmed = line.strip()
6060
if len(trimmed) == 0:

swift_code_metrics/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = "1.0.0"
1+
VERSION = "1.0.1"

0 commit comments

Comments
 (0)