mirror of
https://github.com/astral-sh/uv.git
synced 2025-09-26 12:09:12 +00:00
Rename puffin-warnings macros to avoid tracing collision (#694)
Also more consistent with Ruff.
This commit is contained in:
parent
e98804141c
commit
207bb83a1c
3 changed files with 6 additions and 6 deletions
|
@ -10,7 +10,7 @@ use platform_tags::{TagPriority, Tags};
|
|||
use puffin_client::SimpleMetadata;
|
||||
use puffin_interpreter::Interpreter;
|
||||
use puffin_normalize::PackageName;
|
||||
use puffin_warnings::warn_once;
|
||||
use puffin_warnings::warn_user_once;
|
||||
use pypi_types::Yanked;
|
||||
|
||||
use crate::file::{DistFile, SdistFile, WheelFile};
|
||||
|
@ -63,7 +63,7 @@ impl VersionMap {
|
|||
continue;
|
||||
}
|
||||
None => {
|
||||
warn_once!(
|
||||
warn_user_once!(
|
||||
"{} is missing an upload date, but user provided: {}",
|
||||
file.filename,
|
||||
exclude_newer,
|
||||
|
|
|
@ -17,7 +17,7 @@ pub fn enable() {
|
|||
|
||||
/// Warn a user, if warnings are enabled.
|
||||
#[macro_export]
|
||||
macro_rules! warn {
|
||||
macro_rules! warn_user {
|
||||
($($arg:tt)*) => {
|
||||
use $crate::colored::Colorize;
|
||||
|
||||
|
@ -34,7 +34,7 @@ pub static WARNINGS: Lazy<Mutex<FxHashSet<String>>> = Lazy::new(Mutex::default);
|
|||
/// Warn a user once, if warnings are enabled, with uniqueness determined by the content of the
|
||||
/// message.
|
||||
#[macro_export]
|
||||
macro_rules! warn_once {
|
||||
macro_rules! warn_user_once {
|
||||
($($arg:tt)*) => {
|
||||
use $crate::colored::Colorize;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ use serde::{de, Deserialize, Deserializer, Serialize};
|
|||
|
||||
use pep440_rs::{Pep440Error, VersionSpecifiers};
|
||||
use pep508_rs::{Pep508Error, Requirement};
|
||||
use puffin_warnings::warn_once;
|
||||
use puffin_warnings::warn_user_once;
|
||||
|
||||
/// Ex) `>=7.2.0<8.0.0`
|
||||
static MISSING_COMMA: Lazy<Regex> = Lazy::new(|| Regex::new(r"(\d)([<>=~^!])").unwrap());
|
||||
|
@ -63,7 +63,7 @@ fn parse_with_fixups<Err, T: FromStr<Err = Err>>(input: &str, type_name: &str) -
|
|||
}
|
||||
|
||||
if let Ok(requirement) = T::from_str(&patched_input) {
|
||||
warn_once!(
|
||||
warn_user_once!(
|
||||
"Fixing invalid {type_name} by {} (before: `{input}`; after: `{patched_input}`)",
|
||||
messages.join(", ")
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue