Skip to content

Commit 82f55ed

Browse files
committed
only kept python3, removed python
1 parent ff89e1e commit 82f55ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/file_parser/language.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ impl FromStr for Language {
3535
fn from_str(s: &str) -> Result<Self, Self::Err> {
3636
match s.to_lowercase().as_ref() {
3737
"rs" | "rust" => Ok(Language::Rust),
38-
"py" | "python" | "python3" => Ok(Language::Python3),
38+
/* python creates ambiguity with Python2.7 and Python3
39+
* as both are supported by leetcode, so we only allow python3 */
40+
"py" /*| "python" */ | "python3" => Ok(Language::Python3),
3941
"cpp" => Ok(Language::Cpp),
4042
"java" => Ok(Language::Java),
4143
"c" => Ok(Language::C),

0 commit comments

Comments
 (0)