Skip to content

Commit 5e064b0

Browse files
authored
[sui 14/x] - PyCharm Move linter (#928)
* linting stuff * more linting * more linting
1 parent e5fd5a9 commit 5e064b0

File tree

9 files changed

+22
-22
lines changed

9 files changed

+22
-22
lines changed

target_chains/sui/contracts/sources/batch_price_attestation.move

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ module pyth::batch_price_attestation {
4848
let _unknown = bytes::take_bytes(cur, (unknown_header_bytes as u64));
4949

5050
Header {
51-
magic: magic,
51+
magic,
5252
header_size: (header_size as u64),
5353
version_minor: (version_minor as u64),
5454
version_major: (version_major as u64),
55-
payload_id: payload_id,
55+
payload_id,
5656
}
5757
}
5858

@@ -105,7 +105,7 @@ module pyth::batch_price_attestation {
105105
header,
106106
attestation_count: (attestation_count as u64),
107107
attestation_size: (attestation_size as u64),
108-
price_infos: price_infos,
108+
price_infos,
109109
}
110110
}
111111

target_chains/sui/contracts/sources/data_source.move

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ module pyth::data_source {
5959

6060
public(friend) fun new(emitter_chain: u64, emitter_address: ExternalAddress): DataSource {
6161
DataSource {
62-
emitter_chain: emitter_chain,
63-
emitter_address: emitter_address,
62+
emitter_chain,
63+
emitter_address,
6464
}
6565
}
6666

target_chains/sui/contracts/sources/governance/governance_instruction.move

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module pyth::governance_instruction {
6161
module_: _,
6262
action: _,
6363
target_chain_id: _,
64-
payload: payload
64+
payload
6565
} = instruction;
6666
payload
6767
}

target_chains/sui/contracts/sources/i64.move

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ module pyth::i64 {
3131
};
3232

3333
I64 {
34-
magnitude: magnitude,
35-
negative: negative,
34+
magnitude,
35+
negative,
3636
}
3737
}
3838

target_chains/sui/contracts/sources/price.move

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ module pyth::price {
2121

2222
public fun new(price: I64, conf: u64, expo: I64, timestamp: u64): Price {
2323
Price {
24-
price: price,
25-
conf: conf,
26-
expo: expo,
27-
timestamp: timestamp,
24+
price,
25+
conf,
26+
expo,
27+
timestamp,
2828
}
2929
}
3030

target_chains/sui/contracts/sources/price_feed.move

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ module pyth::price_feed {
1717
price: Price,
1818
ema_price: Price): PriceFeed {
1919
PriceFeed {
20-
price_identifier: price_identifier,
21-
price: price,
22-
ema_price: ema_price,
20+
price_identifier,
21+
price,
22+
ema_price,
2323
}
2424
}
2525

target_chains/sui/contracts/sources/price_identifier.move

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module pyth::price_identifier {
1111
public fun from_byte_vec(bytes: vector<u8>): PriceIdentifier {
1212
assert!(vector::length(&bytes) == IDENTIFIER_BYTES_LENGTH, E_INCORRECT_IDENTIFIER_LENGTH);
1313
PriceIdentifier {
14-
bytes: bytes
14+
bytes
1515
}
1616
}
1717

target_chains/sui/contracts/sources/price_info.move

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ module pyth::price_info {
9797
): PriceInfoObject {
9898
PriceInfoObject {
9999
id: object::new(ctx),
100-
price_info: price_info
100+
price_info
101101
}
102102
}
103103

@@ -107,9 +107,9 @@ module pyth::price_info {
107107
price_feed: PriceFeed,
108108
): PriceInfo {
109109
PriceInfo {
110-
attestation_time: attestation_time,
111-
arrival_time: arrival_time,
112-
price_feed: price_feed,
110+
attestation_time,
111+
arrival_time,
112+
price_feed,
113113
}
114114
}
115115

@@ -145,7 +145,7 @@ module pyth::price_info {
145145
#[test_only]
146146
public fun destroy(price_info: PriceInfoObject){
147147
let PriceInfoObject {
148-
id: id,
148+
id,
149149
price_info: _,
150150
} = price_info;
151151
object::delete(id);

target_chains/sui/contracts/sources/price_status.move

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module pyth::price_status {
1515
public fun from_u64(status: u64): PriceStatus {
1616
assert!(status <= TRADING, 0);
1717
PriceStatus {
18-
status: status
18+
status
1919
}
2020
}
2121

0 commit comments

Comments
 (0)