我正在将项目转移到新的 jdk,从 6 到 21。该项目使用旧的 Oracle 库:bc4jct(oracle jbo 和 svcmsg)、bc4jdomorcl(oracle jbo)、bc4jmt(oracle jbo 和 svcmsg)、adfshare(oracle.adf.share)。
在新的 jdk 上它们会导致 jbo 异常,我试图找到它们的新版本,但在任何地方都找不到它们。
需要帮助解决此事。
下面是 Oracle 网站的链接,其中有更多关于bc4j 的内容。
有一段代码:
import pandas as pd
currency = 'usd'
url = "https://www.fontanka.ru/currency.html"
df = pd.read_html(url)[0]
rate = df.loc[df['Валюта'].isin([str(currency)]), ['Курс']]
给出:
Курс
0 86.19
我只需要获取美元汇率值86.19,不需要列名、行号等,只是一个数字。如果没有拐杖的话该如何做到这一点replace?
该项目的测试结构如下:
├── app
| └── db
| └── postgres.py
| └── postgres.py
└── postgres.py
如果您不设置配置,调用poetry run mypy . | grep postgres将提供以下内容:
postgres.py:2: error: Unsupported operand types for + ("str" and
"float") [operator]
app/postgres.py:2: error: Unsupported operand types for + ("str"
and "float") [operator]
app/db/postgres.py:11: error: "Constraint" has no attribute
"columns" [attr-defined]
但是,我的目标是排除一个目录db或至少一个文件app/db/postgres.py,因此我pyproject.toml添加:
[tool.mypy]
exclude = ["postgres.py", "db", "app/db", "db/postgres.py", "app/db/postgres.py"]
我跟注poetry run mypy . | grep postgres。结论:
app/db/postgres.py:11: error: "Constraint" has no attribute "columns" [attr-defined]
由于某种原因,在第二层嵌套中,mypy它不想尊重exclude。看起来问题甚至不在这个参数上。有人可以帮忙吗?