Skip to content

Update sal_json.py#9

Open
CodeVigil-bot wants to merge 1 commit into
mainfrom
Code-Review-Bot-Commits-patch-3
Open

Update sal_json.py#9
CodeVigil-bot wants to merge 1 commit into
mainfrom
Code-Review-Bot-Commits-patch-3

Conversation

@CodeVigil-bot

Copy link
Copy Markdown
Owner

No description provided.

Comment thread sal_json.py
Comment on lines +7 to 8
self.emp_id = emp_id
self.name = name

This comment was marked as spam.

Comment thread sal_json.py
Comment on lines +49 to 50
output_file = 'employees.json'

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: output_file = 'employees.csv'
in 49

Comment thread sal_json.py
Comment on lines +56 to 57
print(f"Employee data has been saved to {output_file}")
except Exception as e:

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: IndentationError: expected an indented block in 56

Comment thread sal_json.py
Comment on lines +58 to 59
print(f"An error occurred: {e}")

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: IndentationError: expected an indented in 58

Comment thread sal_json.py
Comment on lines +5 to +6
class Emplyee:
def __init__(self, emp_id, name, position, salary):

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: SyntaxError: expected ':' after class definition
Input in 5

Comment thread sal_json.py
Comment on lines +6 to +7
def __init__(self, emp_id, name, position, salary):
self.emp_id = emp_id

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: def init(self, emp_id in 6

Comment thread sal_json.py
Comment on lines +7 to 8
self.emp_id = emp_id
self.name = name

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: AttributeError: 'Employee' object has no attribute in 7

Comment thread sal_json.py
Comment on lines +17 to 18
'employee_id': self.emp_id,
'name': self.name,

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: SyntaxError: invalid syntax
Input: ' in 17

Comment thread sal_json.py
Comment on lines +32 to +33
employee = Emplyee(
emp_id=row['employee_id'],

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: SyntaxError: expected class or def statement
Input in 32

Comment thread sal_json.py
Comment on lines +33 to 34
emp_id=row['employee_id'],
name=row['name'],

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: employee_id=row['employee_id in 33

Comment thread sal_json.py
Comment on lines +47 to +48
def main():
input_file = 'employees.csv'

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: SyntaxError: invalid syntax
Input: print(" in 47

Comment thread sal_json.py
Comment on lines +48 to +49
input_file = 'employees.csv'
output_file = 'employees.json'

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment:
Input: output_file = 'employees. in 48

Comment thread sal_json.py
Comment on lines +49 to 50
output_file = 'employees.json'

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: output_file = 'employees.csv'
in 49

Comment thread sal_json.py
Comment on lines +52 to 53
employees = read_employees_from_csv(input_file)
for employee in employees:

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: employees = read_employees_from_csv in 52

Comment thread sal_json.py
Comment on lines +55 to +56
save_employees_to_json(employees, output_file)
print(f"Employee data has been saved to {output_file}")

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: IndentationError: expected an indented block in 55

Comment thread sal_json.py
Comment on lines +56 to 57
print(f"Employee data has been saved to {output_file}")
except Exception as e:

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: IndentationError: expected an indented block in 56

Comment thread sal_json.py
Comment on lines +58 to 59
print(f"An error occurred: {e}")

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: IndentationError: expected an indented in 58

Comment thread sal_json.py
Comment on lines +5 to +6
class Emplyee:
def __init__(self, emp_id, name, position, salary):

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: SyntaxError: expected ':' after class definition
Input in 5

Comment thread sal_json.py
Comment on lines +6 to +7
def __init__(self, emp_id, name, position, salary):
self.emp_id = emp_id

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: def init(self, emp_id in 6

Comment thread sal_json.py
Comment on lines +7 to 8
self.emp_id = emp_id
self.name = name

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: AttributeError: 'Employee' object has no attribute in 7

Comment thread sal_json.py
Comment on lines +17 to 18
'employee_id': self.emp_id,
'name': self.name,

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: SyntaxError: invalid syntax
Input: ' in 17

Comment thread sal_json.py
Comment on lines +32 to +33
employee = Emplyee(
emp_id=row['employee_id'],

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: SyntaxError: expected class or def statement
Input in 32

Comment thread sal_json.py
Comment on lines +33 to 34
emp_id=row['employee_id'],
name=row['name'],

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: employee_id=row['employee_id in 33

Comment thread sal_json.py
Comment on lines +47 to +48
def main():
input_file = 'employees.csv'

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: SyntaxError: invalid syntax
Input: print(" in 47

Comment thread sal_json.py
Comment on lines +48 to +49
input_file = 'employees.csv'
output_file = 'employees.json'

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment:
Input: output_file = 'employees. in 48

Comment thread sal_json.py
Comment on lines +49 to 50
output_file = 'employees.json'

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: output_file = 'employees.csv'
in 49

Comment thread sal_json.py
Comment on lines +52 to 53
employees = read_employees_from_csv(input_file)
for employee in employees:

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: employees = read_employees_from_csv in 52

Comment thread sal_json.py
Comment on lines +55 to +56
save_employees_to_json(employees, output_file)
print(f"Employee data has been saved to {output_file}")

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: IndentationError: expected an indented block in 55

Comment thread sal_json.py
Comment on lines +56 to 57
print(f"Employee data has been saved to {output_file}")
except Exception as e:

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: IndentationError: expected an indented block in 56

Comment thread sal_json.py
Comment on lines +58 to 59
print(f"An error occurred: {e}")

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested comment: IndentationError: expected an indented in 58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant