Skip to content

Commit a99c31c

Browse files
authored
Merge pull request #136 from stm32-rs/python39
bump python to 3.9
2 parents 074c31f + 53e06f8 commit a99c31c

File tree

7 files changed

+13
-15
lines changed

7 files changed

+13
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Install Python
1919
uses: actions/setup-python@v2
2020
with:
21-
python-version: 3.6
21+
python-version: 3.9
2222
- name: Install svdtools
2323
run: |
2424
python -m pip install --upgrade pip
@@ -54,7 +54,7 @@ jobs:
5454
- name: Install Python
5555
uses: actions/setup-python@v2
5656
with:
57-
python-version: 3.6
57+
python-version: 3.9
5858
- name: Install svdtools
5959
run: |
6060
python -m pip install --upgrade pip

CHANGELOG-python.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ This changelog tracks the Python `svdtools` project. See
55

66
## [Unreleased]
77

8+
* Bump python to 3.9 to fix CI
9+
810
## [v0.1.25] 2022-09-04
911

1012
* Fix bug in deriving registers (#124)

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ author-email = "[email protected]"
1010
maintainer = "Nicolas Stalder"
1111
maintainer-email = "[email protected]"
1212
home-page = "https://github.com/stm32-rs/svdtools"
13-
requires-python = ">=3.6"
13+
requires-python = ">=3.9"
1414
description-file = "README.md"
1515
requires = [
1616
"click ~= 8.0",
@@ -24,8 +24,7 @@ classifiers=[
2424
"Intended Audience :: Developers",
2525
"Intended Audience :: End Users/Desktop",
2626
"Programming Language :: Python :: 3 :: Only",
27-
"Programming Language :: Python :: 3.6",
28-
"Programming Language :: Python :: 3.7",
27+
"Programming Language :: Python :: 3.9",
2928
]
3029

3130
[tool.flit.scripts]

src/interrupts/interrupts_cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ fn print_interrupts(interrupt_list: &[InterruptWithPeriph]) {
4242
fn print_gaps(gaps: &[u32]) {
4343
let gaps: Vec<String> = gaps.iter().map(|g| g.to_string()).collect();
4444
let gaps_str = gaps.join(", ");
45-
println!("Gaps: {}", gaps_str);
45+
println!("Gaps: {gaps_str}");
4646
}

src/makedeps/makedeps_cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn write_to_file(file: &mut File, string_to_write: &str) -> Result<()> {
1515

1616
fn write_file(file_name: &Path, deps: Vec<PathBuf>) -> Result<()> {
1717
// Open a file in write-only mode
18-
let mut file = File::create(&file_name)?;
18+
let mut file = File::create(file_name)?;
1919

2020
let file_name = format!("{}:", file_name.file_name().unwrap().to_str().unwrap());
2121
write_to_file(&mut file, &file_name)?;

src/mmap/mmap_cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub fn parse_device(svd_file: &Path) -> Result<()> {
1414
Err(e).with_context(|| format!("Parsing {path_str}"))
1515
}
1616
Ok(text) => {
17-
println!("{}", text);
17+
println!("{text}");
1818
Ok(())
1919
}
2020
}

src/patch/mod.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ fn update_dict(parent: &mut Hash, child: &Hash) -> Result<()> {
128128
if let Entry::Occupied(mut e) = parent.entry(key.clone()) {
129129
match e.get_mut() {
130130
el if el == val => {
131-
println!("In {:?}: dublicate rule {:?}, ignored", key, val);
131+
println!("In {key:?}: dublicate rule {val:?}, ignored");
132132
}
133133
Yaml::Array(a) => match val {
134134
Yaml::Array(val) => {
@@ -138,7 +138,7 @@ fn update_dict(parent: &mut Hash, child: &Hash) -> Result<()> {
138138
if !a.contains(val) {
139139
a.push(val.clone());
140140
} else {
141-
println!("In {:?}: dublicate rule {:?}, ignored", key, val);
141+
println!("In {key:?}: dublicate rule {val:?}, ignored");
142142
}
143143
}
144144
_ => {}
@@ -153,14 +153,11 @@ fn update_dict(parent: &mut Hash, child: &Hash) -> Result<()> {
153153
a.insert(0, s.clone());
154154
e.insert(Yaml::Array(a));
155155
} else {
156-
println!("In {:?}: dublicate rule {:?}, ignored", key, s);
156+
println!("In {key:?}: dublicate rule {s:?}, ignored");
157157
}
158158
}
159159
s2 if matches!(s2, Yaml::String(_)) => {
160-
println!(
161-
"In {:?}: conflicting rules {:?} and {:?}, ignored",
162-
key, s, s2
163-
);
160+
println!("In {key:?}: conflicting rules {s:?} and {s2:?}, ignored");
164161
}
165162
_ => {}
166163
},

0 commit comments

Comments
 (0)